Skip to content

fix(webapp): scheduled task test page crash on empty payloads#3335

Closed
itskrishna21 wants to merge 1 commit intotriggerdotdev:mainfrom
itskrishna21:chore/issues-last-week-2026-04-07
Closed

fix(webapp): scheduled task test page crash on empty payloads#3335
itskrishna21 wants to merge 1 commit intotriggerdotdev:mainfrom
itskrishna21:chore/issues-last-week-2026-04-07

Conversation

@itskrishna21
Copy link
Copy Markdown

Summary

  • Prevent scheduled task test page from crashing when prior runs have empty or malformed payloads.
  • Extract scheduled payload parsing into a small helper and add regression tests.

Details

This addresses refs #3316.

Test plan

  • cd apps/webapp && pnpm run test ./test/scheduledTaskTestPageEmptyPayload.test.ts --run

Notes

  • Adds .server-changes/ entry for release notes.

Made with Cursor

Harden scheduled run payload parsing to handle empty/malformed packets without throwing, and add a regression test.

Made-with: Cursor
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 7, 2026

⚠️ No Changeset found

Latest commit: d936ab3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Hi @itskrishna21, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 704c7664-ad38-4e81-970d-8c7365ad08d2

📥 Commits

Reviewing files that changed from the base of the PR and between def21b2 and d936ab3.

📒 Files selected for processing (4)
  • .server-changes/fix-scheduled-task-test-page-empty-payload.md
  • apps/webapp/app/presenters/v3/TestTaskPresenter.server.ts
  • apps/webapp/app/presenters/v3/getScheduleTaskRunPayload.server.ts
  • apps/webapp/test/scheduledTaskTestPageEmptyPayload.test.ts

Walkthrough

This PR fixes scheduled task test page crashes caused by empty payloads. The changes extract a getScheduleTaskRunPayload helper function from TestTaskPresenter.server.ts into a dedicated file at getScheduleTaskRunPayload.server.ts, refactor the presenter to use the extracted helper for payload parsing in both latestRuns and taskRunTemplates, add a new test suite validating the helper with three scenarios (empty JSON, valid SuperJSON, and invalid JSON), and document the fix in a changelog entry.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot closed this Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant